package com.azt.provider.impl;

import com.azt.api.pojo.CompanyCategory;
import com.azt.api.service.CompanyCategoryService;
import com.azt.provider.mapper.CompanyCategoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;



@Transactional
@Service
public class CompanyCategoryServiceImpl implements CompanyCategoryService {
	
	
	@Autowired
	private CompanyCategoryMapper companyCategoryMapper;

	@Override
	public void saveOrUpdateCategorys(List<CompanyCategory> ccs) {
		companyCategoryMapper.insertList(ccs);
	}

	@Override
	public List<CompanyCategory> findCategoryByCompanyId(int companyId) {
		CompanyCategory cc = new CompanyCategory();
		cc.setCompanyId(companyId);
		return companyCategoryMapper.select(cc);
	}

}
